/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Carito
 */
@Embeddable
@XmlRootElement
public class BoletinPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDBOLETIN")
    private BigInteger idboletin;
    @Basic(optional = false)
    @NotNull
    @Column(name = "IDDATO")
    private BigInteger iddato;

    public BoletinPK() {
    }

    public BoletinPK(BigInteger idboletin, BigInteger iddato) {
        this.idboletin = idboletin;
        this.iddato = iddato;
    }

    @XmlAttribute
    public BigInteger getIdboletin() {
        return idboletin;
    }

    public void setIdboletin(BigInteger idboletin) {
        this.idboletin = idboletin;
    }

    @XmlAttribute
    public BigInteger getIddato() {
        return iddato;
    }

    public void setIddato(BigInteger iddato) {
        this.iddato = iddato;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idboletin != null ? idboletin.hashCode() : 0);
        hash += (iddato != null ? iddato.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BoletinPK)) {
            return false;
        }
        BoletinPK other = (BoletinPK) object;
        if ((this.idboletin == null && other.idboletin != null) || (this.idboletin != null && !this.idboletin.equals(other.idboletin))) {
            return false;
        }
        if ((this.iddato == null && other.iddato != null) || (this.iddato != null && !this.iddato.equals(other.iddato))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entity.BoletinPK[ idboletin=" + idboletin + ", iddato=" + iddato + " ]";
    }
    
}
